function changFace(){
    var reader = new FileReader();//定义文件读取流对象
    reader.readAsDataURL($("fileTxt").files[0]);
    reader.onload = function (ev) {
        $("faceImg").src = ev.target.result;
    }
}
 async function add(){
    var formObj=new FormData();
    formObj.append("uploadImg",$("fileTxt").files[0]);
     let config = {
         headers: {'Content-Type': 'multipart/form-data' }
     }
     var  uploadFileName;
     //向服务器上传文件，得到上传文件名
     await axios.post("/upload",formObj,config).then(resp=>{
         uploadFileName=resp.data;
     });
    // alert(uploadFileName);
     axios.get("/em/add",{
         params: {
             name:$("nameTxt").value,
             phone:$("phoneTxt").value,
             money:$("moneyTxt").value,
             imgPath:uploadFileName
         }
     }).then(resp=>{
         var info=resp.data;
         if (info=="ok"){
             location.href="/main.html"
         }else {
             info.forEach(n=>{
                 $(n.field+"Span").innerHTML=n.defaultMessage;
             })
         }
     })
}